package server.workwithgarage;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import abstractservlet.AbstractServlet;
import autoservice.api.controller.IAutoservice;
import controllers.Autoservice;

@WebServlet("/GetNextFreeDate")
public class GetNextFreeDate extends AbstractServlet {
	private static final long serialVersionUID = 1L;
	private IAutoservice autoservice = Autoservice.getInstance();
	private static final String GET_NEXT_FREE_DATE_PAGE = "/workwithgaragepages/GetNextFreeDatePage.jsp";
	private static final String GET_NEXT_FREE_DATE_OPER = "next free date";

	public GetNextFreeDate() {
		super();

	}

	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		super.navigate(request, response, GET_NEXT_FREE_DATE_OPER, autoservice
				.getNextFreeDate().get(0), GET_NEXT_FREE_DATE_PAGE);

	}

}
